package com.msmall.community.space.service.impl;

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.msmall.base.service.impl.BaseManagerImpl;
import com.msmall.community.space.dao.WordsDao;
import com.msmall.community.space.model.Words;
import com.msmall.community.space.service.WordsManager;

public class WordsManagerImpl extends BaseManagerImpl<Words, Long> implements WordsManager {
	
	private static final Log log = LogFactory.getLog(WordsManagerImpl.class);
	
	public WordsDao wordsDao;

	public void setWordsDao(WordsDao wordsDao) {
		this.wordsDao = wordsDao;
	}
	
	/**
	 * 获得用户的所有留言
	 */
	public List<Words> getWordsByUserid(Long userid){
		try {
			return wordsDao.getWordsByUserid(userid);
		} catch (Exception e) {
			log.error(e);
			return null;
		}
	}
}
